#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

import sys

infile = open(sys.argv[1], "r")

count = 1
line_count = 0

outfile = open("pmc_pdf_worklist_" + str(count) + ".list", "w")
for line in infile:
    line = line.rstrip()
    outfile.write(line + "\n")
    outfile.flush()
    line_count += 1
    if line_count == 1000:
        line_count = 0
        outfile.close()
        count += 1
        outfile = open("pmc_pdf_worklist_" + str(count) + ".list", "w")
outfile.close()
infile.close()

